package com.bw.kotlinim.extention

//验证用户名是否为首字母位英文的3-20位字符
fun String.isValidUserName(): Boolean = this.matches(Regex("^[a-zA-Z]\\w{2,19}$"))

//验证密码是否为3-20位数字
fun String.isValidPassword(): Boolean = this.matches(Regex("^[0-9]{3,20}$"))
